<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script src="https://unpkg.com/vue@next"></script>
    <style>
        body{
            margin: 0;
            padding: 0;
        }
        #app{
            width: 100%;
            height: 100vh;
            background-image: linear-gradient(200deg,#8bd4e4,#7f8bdb);
            display: flex;
            justify-content: center;
            align-items: center;
        }
        .card{
            width: 240px;
            height: 380px;
            background: #fff;
            box-shadow: 1px 1px 5px rgba(0,0,0,0.2);
            border-radius: 10px;
            display: flex;
            flex-direction: column;
            margin-right: 20px;
        }
        .card .content{
            width: 100%;
            flex: 1;
            display: flex;
            flex-direction: column;
            overflow: hidden;
            box-sizing: border-box;
            padding: 20px;
        }
        .card .content .img{
            width: 70px;
            height: 70px;
            margin-bottom: 30px;
            text-align: center;
            margin-left: 65px;
        }
        .card .content .img img{
            width: 100%;
            height: 100%;
            border-radius: 50%;
        }
        .card .content span{
            font-size: 25px;
        }
        .card .score{
           
        }
        .card .score .nav{
            width: 100%;
            height: 30px;
            line-height: 30px;
            background: #6f6c85;
            text-align: center;
        }
        .card .score span{
            margin: 20px 0 0 20px;
            /* display: none; */
        }

    </style>
</head>
<body>
    <div id="app">
        <div class="card" v-for="item in stuData":key="item.name">
            <div class="content">
                <div class="img">
                    <img v-bind:src="item.head" alt=""/>
                </div>
                <span>姓名：{{item.name}}</span>
                <span>年龄：{{item.age}}</span>
                <span>性别：{{item.sex}}</span>
                <span>总分:{{item.yw + item.sx + item.yy}}</span>
            </div>
            <div class="score" v-if="(item.yw>= 60) & (item.sx >=60) & (item.yy >= 60)">
                <div class="nav">---</div>
                <span>语文：{{item.yw}}</span>
                <span>数学：{{item.sx}}</span>
                <span>英语：{{item.yy}}</span>
            </div>
        </div>
    </div>
    <script>
        const app={
             data() {
                return{
                    stuData:[
                        {
                           name:'张三',
                           age: 20,
                           sex:'男',
                           head:'1.png',
                           yw: 60,
                           sx:100,
                           yy:70,
                        } ,
                        {
                           name:'李四',
                           age: 20,
                           sex:'男',
                           head:'2.png',
                           yw: 50,
                           sx:100,
                           yy:40,
                        },
                        {
                           name:'王五',
                           age: 20,
                           sex:'男',
                           head:'3.png ',
                           yw: 80,
                           sx:100,
                           yy:60,
                        },
                    ]
                }
             }
        };
        Vue.createApp(app).mount("#app");
        </script>
</body>
</html>